/*
* 安全问题结束
* */

import 'dart:convert';

import 'package:center_beijing/api/product_api.dart';
import 'package:center_beijing/api/task_api.dart';
import 'package:center_beijing/common/logutil.dart';
import 'package:center_beijing/common/notification.dart';
import 'package:center_beijing/common/styles.dart';
import 'package:center_beijing/common/utils.dart';
import 'package:center_beijing/config/global_config.dart';
import 'package:center_beijing/widgets/custom_input_widget.dart';
import 'package:center_beijing/widgets/custom_loading_widget.dart';
import 'package:center_beijing/widgets/imageSelect_widget.dart';
import 'package:center_beijing/widgets/imagesWatch_widget2.dart';
import 'package:center_beijing/widgets/photo_view_gallery.dart';
import 'package:center_beijing/widgets/textarea_widget.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:flutter_swiper/flutter_swiper.dart';
import 'package:fluttertoast/fluttertoast.dart';
import 'package:get/get.dart' as Go;
import 'package:dio/dio.dart' as ImageForm;
import 'package:images_picker/images_picker.dart';
import 'package:left_scroll_actions/cupertinoLeftScroll.dart';
import 'package:left_scroll_actions/global/actionListener.dart';
import 'dart:io';

class SafetyComplete extends StatefulWidget {
  @override
  _SafetyCompleteState createState() => _SafetyCompleteState();
}

class _SafetyCompleteState extends State<SafetyComplete> with SingleTickerProviderStateMixin {
  AnimationController _controller;
  var businessId = Go.Get.arguments['businessId'];
  var taskId = Go.Get.arguments['taskId'];
  CustomLoading loading = CustomLoading.withMessage('提交中...');

  final TextEditingController standardRegulations =
  TextEditingController(); //引用标准/条例
  final TextEditingController rectificationTime =
  TextEditingController(); //限定整改日期
  final TextEditingController initiator = TextEditingController(); //发起人

  var baseDetail = Map();
  List flowList = [];

  /*
  * 责任信息
  * */
  final TextEditingController workArea = TextEditingController(); //工区
  final TextEditingController person = TextEditingController(); //责任人
  final TextEditingController punishmentTeam = TextEditingController(); //处罚班组
  final TextEditingController punishmentTeamInfo =
  TextEditingController(); //处罚班组信息

  var remark = ''; //完成情况

  List punishmentPersonInfoList = [];
  var imgUrl = '';
  bool hide = false;
  List imgs = [];
  List<Media> photos = [];
  ImageForm.FormData formData;
  List passPhoto = [];

  @override
  void initState() {
    _controller = AnimationController(vsync: this);
    super.initState();

    this.getDetail();
    this.getFlowDetail();
  }

  @override
  void dispose() {
    _controller.dispose();
    super.dispose();
  }

  /*
  * 获取问题详情
  * */
  getDetail() async {
    var result = await getQsProblemDetail({'id': businessId});
    if (result != null) {
      if(result['photoFiles']['1']!=null){
        result['photoFiles']['1'].forEach((item) {
          imgs.add(
              "${GlobalConfig.baseUrl}fs/irest/file/mps_fileTransferHandler/image?id=${item['photoId']}&ZJQFSESSION=${GlobalConfig.session}");
        });
      }
      this.setState(() {
        baseDetail = result;

        standardRegulations.text = baseDetail['qsIssueType'] != null
            ? baseDetail['qsIssueType']['name']
            : '--';
        rectificationTime.text = baseDetail['qsCheckRecord'] != null
            ? baseDetail['qsCheckRecord']['deadlineDateStr']
            : '--';
        punishmentPersonInfoList = baseDetail['qsIssuePersonList'] != null
            ? baseDetail['qsIssuePersonList']
            : [];
        punishmentTeamInfo.text = baseDetail['qsCheckRecord'] != null
            ? baseDetail['qsCheckRecord']['punishmentTypeCaption']
            : '--';
      });
    }
    LogUtil.d(result);
  }

  /*
  * 获取流程详情
  * */
  getFlowDetail() async {
    var result = await getProblemDetail({'id': businessId});
    if (result != null) {
      this.setState(() {
        person.text = result['leaderName']!=null?result['leaderName']:'--';
        workArea.text = result['workAreaName']!=null?result['workAreaName']:'--';
        initiator.text = result['list'][0]['updateUserName'];
        flowList = result['list'];
        punishmentTeam.text = result['workerTeamName']!=null?result['workerTeamName']:'--';
      });
    }
    LogUtil.d(result);
  }

  getFlowItemStatus(reviseBeforeStatus, reviseAfterStatus,afterStatusCaption) {
    if ((reviseBeforeStatus == '0' && reviseAfterStatus == '0') ||
        (reviseBeforeStatus == '0' && reviseAfterStatus == '1') ||
        (reviseBeforeStatus == '1' && reviseAfterStatus == '1') ||
        (reviseBeforeStatus == '0' && reviseAfterStatus == '') ||
        (reviseBeforeStatus == '0' && reviseAfterStatus == null) ||
        (reviseBeforeStatus == '1' && reviseAfterStatus == null)) {
      return {'state':'发','complete':false};
    } else if ((reviseBeforeStatus == '2' && reviseAfterStatus == '3') ||
        (reviseBeforeStatus == '3' && reviseAfterStatus == '3')) {
      return {'state':'整','complete':false};
    } else if (reviseBeforeStatus == '3' && reviseAfterStatus == '2') {
      return {'state':'复','complete':false};
    } else if (reviseBeforeStatus == '3' && reviseAfterStatus == '4') {
      return {'state':'复','complete':true};
    } else {
      return {'state':'','complete':false};
    }
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('整改详情'),
      ),
      body: Container(
        color: Styles.MainBackgroundColor,
        padding: EdgeInsets.fromLTRB(
            0, 0, 0, MediaQuery.of(context).padding.bottom),
        child: Column(
          children: [
            Container(
              padding: EdgeInsets.fromLTRB(Styles.spacing8, Styles.spacing8,
                  Styles.spacing8, Styles.spacing8),
              child: Row(
                mainAxisAlignment: MainAxisAlignment.spaceBetween,
                children: [
                  Row(
                    children: [
                      Container(
                        height: 26.h,
                        width: 4,
                        color: Styles.BlueColor,
                        margin: EdgeInsets.only(right: Styles.spacing8),
                      ),
                      Text(
                        '基本信息',
                        style: TextStyle(
                            color: Styles.DetailColor,
                            fontSize: Styles.Middle16Font),
                      ),
                    ],
                  ),
                ],
              ),
            ),
            Container(
              color: Colors.white,
              padding: EdgeInsets.fromLTRB(Styles.spacing8, Styles.spacing8,
                  Styles.spacing8, Styles.spacing8),
              child: Row(
                crossAxisAlignment: CrossAxisAlignment.start,
                children: [
                  imgs.length > 0?GestureDetector(
                    onTap: (){
                      Navigator.of(context).push(new FadeRoute(
                          page: PhotoViewGalleryScreen(
                              images: imgs, //传入图片list
                              index: 0, //传入当前点击的图片的index
                              heroTag: '')));
                    },
                    child: Container(
                      child: Image.network(
                        imgs[0],
                        height: 80.h,
                        width: 80.w,
                        fit: BoxFit.fill,
                      ),
                    ),
                  ):Container(child: Image.asset(
                    'assets/images/default_image.png',
                    height: 80.h,
                    width: 80.w,
                    fit: BoxFit.fill,
                  )),
                  Expanded(child: Container(
                    alignment: Alignment.centerLeft,
                    margin: EdgeInsets.fromLTRB(
                        Styles.spacing8, 0, Styles.spacing8, 0),
                    child: Text(
                      (baseDetail['qsCheckRecord'] != null &&
                          baseDetail['qsCheckRecord']['summary'] != null)
                          ? baseDetail['qsCheckRecord']['summary']
                          : '--',
                      style: TextStyle(
                          color: Styles.LeftTitleColor,
                          fontSize: Styles.NormalFont),
                    ),
                  )),
                ],
              ),
            ),
            Container(
              color: Colors.white,
              alignment: Alignment.centerLeft,
              padding: EdgeInsets.fromLTRB(Styles.spacing8, Styles.spacing4,
                  Styles.spacing8, Styles.spacing4),
              child: Text(
                  '问题发现时间   ${baseDetail['qsCheckRecord'] != null ? baseDetail['qsCheckRecord']['recordCreateTimeStr'] : ''}'),
            ),
            Expanded(
                child: SingleChildScrollView(
                  child: Column(
                    children: [
                      Container(
                        padding: EdgeInsets.fromLTRB(Styles.spacing8,
                            Styles.spacing8, Styles.spacing8, Styles.spacing8),
                        child: Row(
                          mainAxisAlignment: MainAxisAlignment.spaceBetween,
                          children: [
                            Row(
                              children: [
                                Container(
                                  height: 26.h,
                                  width: 4,
                                  color: Styles.BlueColor,
                                  margin: EdgeInsets.only(right: Styles.spacing8),
                                ),
                                Text(
                                  '构件信息',
                                  style: TextStyle(
                                      color: Styles.DetailColor,
                                      fontSize: Styles.Middle16Font),
                                ),
                              ],
                            ),
                          ],
                        ),
                      ),
                      this.baseDetail['elements']!=null?Column(
                        children: this.baseDetail['elements'].map<Widget>((item){
                          return Container(
                            alignment: Alignment.centerLeft,
                            color: Colors.white,
                            padding: EdgeInsets.fromLTRB(
                                Styles.spacing16,
                                Styles.spacing8,
                                Styles.spacing8,
                                Styles.spacing8),
                            margin: EdgeInsets.only(top: Styles.spacing8),
                            child: Column(
                              children: [
                                Container(
                                  alignment: Alignment.centerLeft,
                                  child: Text(
                                    item['compKindName']!=null
                                        ? item['compKindName']
                                        : '--',
                                    style: TextStyle(
                                        color: Styles.DetailColor,
                                        fontSize: Styles.Middle16Font),
                                  ),
                                ),
                                Container(
                                  alignment: Alignment.centerLeft,
                                  child: Text(
                                    item['code'] != null
                                        ? item['code']
                                        : '--',
                                    style: TextStyle(
                                        color: Styles.DetailColor,
                                        fontSize: Styles.Middle16Font),
                                  ),
                                )
                              ],
                            ),
                          );
                        }).toList(),
                      ):Container(),
                      Container(
                        padding: EdgeInsets.fromLTRB(Styles.spacing8,
                            Styles.spacing16, Styles.spacing8, Styles.spacing16),
                        child: Row(
                          children: [
                            Container(
                              height: 26.h,
                              width: 4,
                              color: Styles.BlueColor,
                              margin: EdgeInsets.only(right: Styles.spacing8),
                            ),
                            Text(
                              '人员处罚信息',
                              style: TextStyle(
                                  color: Styles.DetailColor,
                                  fontSize: Styles.Middle16Font),
                            ),
                          ],
                        ),
                      ),
                      Column(
                        crossAxisAlignment: CrossAxisAlignment.start,
                        children: punishmentPersonInfoList.map((e) {
                          return Container(
                            color: Colors.white,
                            alignment: Alignment.centerLeft,
                            padding: EdgeInsets.fromLTRB(
                                Styles.spacing8,
                                Styles.spacing8,
                                Styles.spacing8,
                                Styles.spacing8),
                            child: Text(
                                "${e['workerName']}  ${Utils.getPunishmentType(e['punishmentType'])}  扣分${e['workerScore']}"),
                          );
                        }).toList(),
                      ),

                      Container(
                        padding: EdgeInsets.fromLTRB(Styles.spacing8,
                            Styles.spacing8, Styles.spacing8, Styles.spacing8),
                        child: Row(
                          mainAxisAlignment: MainAxisAlignment.spaceBetween,
                          children: [
                            Row(
                              children: [
                                Container(
                                  height: 26.h,
                                  width: 4,
                                  color: Styles.BlueColor,
                                  margin: EdgeInsets.only(right: Styles.spacing8),
                                ),
                                Text(
                                  '整改记录',
                                  style: TextStyle(
                                      color: Styles.DetailColor,
                                      fontSize: Styles.Middle16Font),
                                ),
                              ],
                            ),
                          ],
                        ),
                      ),
                      Column(
                        children: flowList.map((item) {
                          var bbq = this.getFlowItemStatus(
                              item['reviseBeforeStatus'],
                              item['reviseAfterStatus'],item['afterStatusCaption']);
                          var status = bbq['state'];
                          var ifComplete = bbq['complete'];
                          return status == ''
                              ? Container()
                              : Column(
                            children: [
                              Container(
                                padding: EdgeInsets.fromLTRB(
                                    Styles.spacing8, 0, Styles.spacing8, 0),
                                margin: EdgeInsets.fromLTRB(
                                    0, Styles.spacing4, 0, Styles.spacing4),
                                child: Row(
                                  crossAxisAlignment: CrossAxisAlignment.start,
                                  children: [
                                    Container(
                                      padding: EdgeInsets.all(Styles.spacing8),
                                      decoration: BoxDecoration(
                                        color: status == '发'
                                            ? Styles.BlueColor
                                            : (status == '整'
                                            ? Styles.OrangeColor
                                            : (status == '复'
                                            ? Styles.PurpleColor
                                            : Styles.GreenColor)),
                                        shape: BoxShape.circle,
                                      ),
                                      child: Text(
                                        status,
                                        style: TextStyle(
                                            color: Styles.ShareWhite,
                                            fontSize: Styles.NormalFont),
                                      ),
                                    ),
                                    Expanded(
                                        child: Container(
                                          padding: EdgeInsets.all(Styles.spacing8),
                                          margin: EdgeInsets.fromLTRB(
                                              Styles.spacing8,
                                              0,
                                              Styles.spacing8,
                                              0),
                                          decoration: BoxDecoration(
                                              color: Styles.GrayLight,
                                              borderRadius: BorderRadius.all(
                                                  Radius.circular(4.0.r)),
                                              border: Border.all(
                                                  width: 1,
                                                  color: Styles.LineColor)),
                                          child: Column(
                                            crossAxisAlignment:
                                            CrossAxisAlignment.start,
                                            children: [
                                              Row(
                                                mainAxisAlignment:
                                                MainAxisAlignment.spaceBetween,
                                                children: [
                                                  Text(
                                                      '由${item['updateUserName']}在${item['recordUpdateTimeStr']}操作',
                                                      style: TextStyle(
                                                          color: Styles.DetailColor,
                                                          fontSize:
                                                          Styles.NormalFont)),
                                                  status=='发'?Container():GestureDetector(
                                                    onTap: () {
                                                      this.setState(() {
                                                        item['hide'] = item['hide']==null?false:!item['hide'];
                                                      });
                                                    },
                                                    child: Container(
                                                      padding: EdgeInsets.only(
                                                          right: Styles.spacing8),
                                                      child: Text(
                                                        (item['hide']==null||item['hide']) ? '查看' : '收起',
                                                        style: TextStyle(
                                                            color: Styles.BlueColor,
                                                            fontSize:
                                                            Styles.NormalFont),
                                                      ),
                                                    ),
                                                  )
                                                ],
                                              ),
                                              status!='发'&&status!='完'&&item['hide']!=null&&!item['hide']
                                                  ? Column(
                                                crossAxisAlignment:
                                                CrossAxisAlignment.start,
                                                children: [
                                                  Container(
                                                    padding:
                                                    EdgeInsets.fromLTRB(
                                                        0,
                                                        Styles.spacing8,
                                                        0,
                                                        Styles.spacing8),
                                                    child: Text(
                                                      status=='整'?'整改情况':'复检情况',
                                                      style: TextStyle(
                                                          color: Styles
                                                              .DetailColor,
                                                          fontSize: Styles
                                                              .NormalFont),
                                                    ),
                                                  ),
                                                  Container(
                                                    padding:
                                                    EdgeInsets.fromLTRB(
                                                        0,
                                                        0,
                                                        0,
                                                        Styles.spacing8),
                                                    child: Text(
                                                      item['summary'],
                                                      style: TextStyle(
                                                          color: Styles
                                                              .LeftTitleColor,
                                                          fontSize: Styles
                                                              .NormalFont),
                                                    ),
                                                  ),
                                                  item['list']!=null&&item['list'].length>0?Column(
                                                    crossAxisAlignment: CrossAxisAlignment.start,
                                                    children: [
                                                      Container(
                                                        padding:
                                                        EdgeInsets.fromLTRB(
                                                            0,
                                                            Styles.spacing8,
                                                            0,
                                                            Styles.spacing8),
                                                        child: Text(
                                                          status=='整'?'整改照片':'复检照片',
                                                          style: TextStyle(
                                                              color: Styles
                                                                  .DetailColor,
                                                              fontSize: Styles
                                                                  .NormalFont),
                                                        ),
                                                      ),
                                                      ImagesWatchWidget2(
                                                        photos: item['list']
                                                            .map<String>((image) {
                                                          return "${GlobalConfig.baseUrl}fs/irest/file/mps_fileTransferHandler/image?id=${image['photoId']}&ZJQFSESSION=${GlobalConfig.session}";
                                                        }).toList(),
                                                      )
                                                    ],
                                                  ):Container(),

                                                ],
                                              )
                                                  : Container(),
                                            ],
                                          ),
                                        ))
                                  ],
                                ),
                              ),
                              ifComplete?Container(
                                padding: EdgeInsets.fromLTRB(
                                    Styles.spacing8, 0, Styles.spacing8, 0),
                                margin: EdgeInsets.fromLTRB(
                                    0, Styles.spacing4, 0, Styles.spacing4),
                                child: Row(
                                  crossAxisAlignment: CrossAxisAlignment.start,
                                  children: [
                                    Container(
                                      padding: EdgeInsets.all(Styles.spacing8),
                                      decoration: BoxDecoration(
                                        color: Styles.HomeGreenCard,
                                        shape: BoxShape.circle,
                                      ),
                                      child: Text(
                                        '完',
                                        style: TextStyle(
                                            color: Styles.ShareWhite,
                                            fontSize: Styles.NormalFont),
                                      ),
                                    ),
                                    Expanded(
                                        child: Container(
                                          padding: EdgeInsets.all(Styles.spacing8),
                                          margin: EdgeInsets.fromLTRB(
                                              Styles.spacing8,
                                              0,
                                              Styles.spacing8,
                                              0),
                                          decoration: BoxDecoration(
                                              color: Styles.GrayLight,
                                              borderRadius: BorderRadius.all(
                                                  Radius.circular(4.0.r)),
                                              border: Border.all(
                                                  width: 1,
                                                  color: Styles.LineColor)),
                                          child: Column(
                                            crossAxisAlignment:
                                            CrossAxisAlignment.start,
                                            children: [
                                              Row(
                                                mainAxisAlignment:
                                                MainAxisAlignment.spaceBetween,
                                                children: [
                                                  Text(
                                                      '由${item['updateUserName']}在${item['recordUpdateTimeStr']}操作',
                                                      style: TextStyle(
                                                          color: Styles.DetailColor,
                                                          fontSize:
                                                          Styles.NormalFont)),
                                                ],
                                              ),
                                            ],
                                          ),
                                        ))
                                  ],
                                ),
                              ):Container()
                            ],
                          );
                        }).toList(),
                      ),

                      Container(
                        padding: EdgeInsets.fromLTRB(Styles.spacing8,
                            Styles.spacing8, Styles.spacing8, Styles.spacing8),
                        child: Row(
                          mainAxisAlignment: MainAxisAlignment.spaceBetween,
                          children: [
                            Row(
                              children: [
                                Container(
                                  height: 26.h,
                                  width: 4,
                                  color: Styles.BlueColor,
                                  margin: EdgeInsets.only(right: Styles.spacing8),
                                ),
                                Text(
                                  '其他信息',
                                  style: TextStyle(
                                      color: Styles.DetailColor,
                                      fontSize: Styles.Middle16Font),
                                ),
                              ],
                            ),
                            GestureDetector(
                              onTap: () {
                                this.setState(() {
                                  hide = !hide;
                                });
                              },
                              child: Container(
                                padding: EdgeInsets.only(right: Styles.spacing8),
                                child: Text(
                                  hide ? '展开' : '收起',
                                  style: TextStyle(
                                      color: Styles.BlueColor,
                                      fontSize: Styles.NormalFont),
                                ),
                              ),
                            )
                          ],
                        ),
                      ),
                      hide
                          ? Container()
                          : Column(
                        children: [
                          Container(
                            color: Colors.white,
                            margin: EdgeInsets.fromLTRB(
                                0, Styles.spacing8, 0, 0),
                            padding: EdgeInsets.fromLTRB(
                                Styles.spacing8, 0, Styles.spacing8, 0),
                            child: CustomInput(
                              inputformat: [
                                LengthLimitingTextInputFormatter(20)
                              ],
                              title: '引用标准/条例',
                              placeHold: '请输入',
                              textInput: this.standardRegulations,
                              clearAll: false,
                              require: false,
                              readOnly: true,
                            ),
                          ),
                          Container(
                            color: Colors.white,
                            margin: EdgeInsets.fromLTRB(
                                0, Styles.spacing8, 0, 0),
                            padding: EdgeInsets.fromLTRB(
                                Styles.spacing8, 0, Styles.spacing8, 0),
                            child: Row(
                              crossAxisAlignment: CrossAxisAlignment.start,
                              children: [
                                Container(
                                  color: Colors.white,
                                  margin: EdgeInsets.fromLTRB(
                                      0, Styles.spacing8, 0, 0),
                                  padding: EdgeInsets.fromLTRB(
                                      Styles.spacing8, 0, Styles.spacing8, 0),
                                  child: Text(
                                    '整改要求',style: TextStyle(color: Styles.DetailColor,fontSize: Styles.MiddleFont17),
                                  ),
                                ),
                                Expanded(child: Container(
                                  color: Colors.white,
                                  margin: EdgeInsets.fromLTRB(
                                      0, Styles.spacing8, 0, 0),
                                  padding: EdgeInsets.fromLTRB(
                                      Styles.spacing8, 0, Styles.spacing8, 0),
                                  child: Text(
                                    baseDetail['qsCheckRecord'] != null
                                        ? baseDetail['qsCheckRecord']['rectifyAsk']
                                        : '--',style: TextStyle(color: Styles.TitleColor,fontSize: Styles.MiddleFont17),
                                  ),
                                ))
                              ],
                            ),
                          ),
                          Container(
                            color: Colors.white,
                            margin: EdgeInsets.fromLTRB(
                                0, Styles.spacing8, 0, 0),
                            padding: EdgeInsets.fromLTRB(
                                Styles.spacing8, 0, Styles.spacing8, 0),
                            child: CustomInput(
                              inputformat: [
                                LengthLimitingTextInputFormatter(20)
                              ],
                              title: '限定整改日期',
                              placeHold: '请输入',
                              textInput: this.rectificationTime,
                              clearAll: false,
                              require: false,
                              readOnly: true,
                            ),
                          ),
                          Container(
                            color: Colors.white,
                            margin: EdgeInsets.fromLTRB(
                                0, Styles.spacing8, 0, 0),
                            padding: EdgeInsets.fromLTRB(
                                Styles.spacing8, 0, Styles.spacing8, 0),
                            child: CustomInput(
                              inputformat: [
                                LengthLimitingTextInputFormatter(20)
                              ],
                              title: '发起人',
                              placeHold: '请输入',
                              textInput: this.initiator,
                              clearAll: false,
                              require: false,
                              readOnly: true,
                            ),
                          ),
                          Container(
                            padding: EdgeInsets.fromLTRB(
                                Styles.spacing8,
                                Styles.spacing8,
                                Styles.spacing8,
                                Styles.spacing8),
                            child: Row(
                              children: [
                                Container(
                                  height: 26.h,
                                  width: 4,
                                  color: Styles.BlueColor,
                                  margin: EdgeInsets.only(
                                      right: Styles.spacing8),
                                ),
                                Text(
                                  '责任信息',
                                  style: TextStyle(
                                      color: Styles.DetailColor,
                                      fontSize: Styles.Middle16Font),
                                ),
                              ],
                            ),
                          ),
                          Container(
                            color: Colors.white,
                            margin: EdgeInsets.fromLTRB(
                                0, Styles.spacing8, 0, 0),
                            padding: EdgeInsets.fromLTRB(
                                Styles.spacing8, 0, Styles.spacing8, 0),
                            child: CustomInput(
                              inputformat: [
                                LengthLimitingTextInputFormatter(20)
                              ],
                              title: '责任工区',
                              placeHold: '请输入',
                              textInput: this.workArea,
                              clearAll: false,
                              require: false,
                              readOnly: true,
                            ),
                          ),
                          Container(
                            color: Colors.white,
                            margin: EdgeInsets.fromLTRB(
                                0, Styles.spacing8, 0, 0),
                            padding: EdgeInsets.fromLTRB(
                                Styles.spacing8, 0, Styles.spacing8, 0),
                            child: CustomInput(
                              inputformat: [
                                LengthLimitingTextInputFormatter(20)
                              ],
                              title: '责任人',
                              placeHold: '请输入',
                              textInput: this.person,
                              clearAll: false,
                              require: false,
                              readOnly: true,
                            ),
                          ),
                          Container(
                            color: Colors.white,
                            margin: EdgeInsets.fromLTRB(
                                0, Styles.spacing8, 0, 0),
                            padding: EdgeInsets.fromLTRB(
                                Styles.spacing8, 0, Styles.spacing8, 0),
                            child: CustomInput(
                              inputformat: [
                                LengthLimitingTextInputFormatter(20)
                              ],
                              title: '处罚班组',
                              placeHold: '请输入',
                              textInput: this.punishmentTeam,
                              clearAll: false,
                              require: false,
                              readOnly: true,
                            ),
                          ),
                          Container(
                            color: Colors.white,
                            margin: EdgeInsets.fromLTRB(
                                0, Styles.spacing8, 0, 0),
                            padding: EdgeInsets.fromLTRB(
                                Styles.spacing8, 0, Styles.spacing8, 0),
                            child: CustomInput(
                              inputformat: [
                                LengthLimitingTextInputFormatter(20)
                              ],
                              title: '班组处罚信息',
                              placeHold: '请输入',
                              textInput: this.punishmentTeamInfo,
                              clearAll: false,
                              require: false,
                              readOnly: true,
                            ),
                          ),
                        ],
                      )
                    ],
                  ),
                ))
          ],
        ),
      ),
    );
  }
}
